<div id="content" class="hfeed">
    <div class="page hentry entry">
        <div class="post-wrap">
            <div class="entry-content">

                <h2>Xem thông tin</h2>
                <dl>
                		<dt><?php echo __('Customer Id'); ?></dt>
                		<dd>
                			<?php echo h($customer['Customer']['customer_id']); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Customer Code'); ?></dt>
                		<dd>
                			<?php echo h($customer['Customer']['customer_code']); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Customer Name'); ?></dt>
                		<dd>
                			<?php echo h($customer['Customer']['customer_name']); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Customer Ssn'); ?></dt>
                		<dd>
                			<?php echo h($customer['Customer']['customer_ssn']); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Customer Phone'); ?></dt>
                		<dd>
                			<?php echo h($customer['Customer']['customer_phone']); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Customer Address'); ?></dt>
                		<dd>
                			<?php echo h($customer['Customer']['customer_address']); ?>
                			&nbsp;
                		</dd>
                		<dt><?php echo __('Account'); ?></dt>
                		<dd>
                			<?php echo $this->Html->link($customer['Account']['account_name'], array('controller' => 'accounts', 'action' => 'view', $customer['Account']['account_id'])); ?>
                			&nbsp;
                		</dd>
                	</dl>

                <div class="related">
                	<h3><?php echo __('Related Sales'); ?></h3>
                	<?php if (!empty($customer['Sale'])): ?>
                	<table cellpadding = "0" cellspacing = "0">
                	<tr>
                		<th><?php echo __('Sale Id'); ?></th>
                		<th><?php echo __('Sale Code'); ?></th>
                		<th><?php echo __('Customer Id'); ?></th>
                		<th><?php echo __('Employee Id'); ?></th>
                		<th><?php echo __('Date Sell'); ?></th>
                		<th><?php echo __('Subtotal'); ?></th>
                		<th><?php echo __('Discount For Buyer'); ?></th>
                		<th><?php echo __('Total'); ?></th>
                		<th><?php echo __('Sale Description'); ?></th>
                		<th class="actions"><?php echo __('Actions'); ?></th>
                	</tr>
                	<?php foreach ($customer['Sale'] as $sale): ?>
                		<tr>
                			<td><?php echo $sale['sale_id']; ?></td>
                			<td><?php echo $sale['sale_code']; ?></td>
                			<td><?php echo $sale['customer_id']; ?></td>
                			<td><?php echo $sale['employee_id']; ?></td>
                			<td><?php echo $sale['date_sell']; ?></td>
                			<td><?php echo $sale['subtotal']; ?></td>
                			<td><?php echo $sale['discount_for_buyer']; ?></td>
                			<td><?php echo $sale['total']; ?></td>
                			<td><?php echo $sale['sale_description']; ?></td>
                			<td class="actions">
                				<?php echo $this->Html->link(__('View'), array('controller' => 'sales', 'action' => 'view', $sale['sale_id'])); ?>
                				<?php echo $this->Html->link(__('Edit'), array('controller' => 'sales', 'action' => 'edit', $sale['sale_id'])); ?>
                				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'sales', 'action' => 'delete', $sale['sale_id']), array(), __('Are you sure you want to delete # %s?', $sale['sale_id'])); ?>
                			</td>
                		</tr>
                	<?php endforeach; ?>
                	</table>
                <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
</div>
<div id="sidebar" class="sidebar">
    <div class="widget">
        <h4>Chức năng</h4>
        <ul class="menu">
            <li><?php echo $this->Html->link(__('Edit Customer'), array('action' => 'edit', $customer['Customer']['customer_id'])); ?> </li>
            <li><?php echo $this->Form->postLink(__('Delete Customer'), array('action' => 'delete', $customer['Customer']['customer_id']), array(), __('Are you sure you want to delete # %s?', $customer['Customer']['customer_id'])); ?> </li>
            <li><?php echo $this->Html->link(__('List Customers'), array('action' => 'index')); ?> </li>
            <li><?php echo $this->Html->link(__('New Customer'), array('action' => 'add')); ?> </li>
        </ul>
    </div>
</div>

